/***
 * @Author: Xavier 1305433186@qq.com
 * @Date: 2024-08-12 10:41:30
 * @LastEditors: Xavier 1305433186@qq.com
 * @LastEditTime: 2024-08-16 15:00:53
 * @FilePath: \JS32T031_SDK\User\gpio_simulate_uart_V2\gpio_simulate_uart_V2.h
 * @Description:
 * @
 * @STAYTRUE (c) 2024 by ${Xavier}, All Rights Reserved.
 */
/***
 * @Author: Xavier 1305433186@qq.com
 * @Date: 2024-08-12 10:41:30
 * @LastEditors: Xavier 1305433186@qq.com
 * @LastEditTime: 2024-08-13 14:04:06
 * @FilePath: \JS32T031_SDK\User\gpio_simulate_uart_V2\gpio_simulate_uart_V2.h
 * @Description:
 * @
 * @STAYTRUE (c) 2024 by ${Xavier}, All Rights Reserved.
 */

#ifndef _GPIO_SIMULATE_UART_V2_H_
#define _GPIO_SIMULATE_UART_V2_H_

#define PRINTF_LOG 1

// // 定义接收和发送的IO口
// #define TX_GPIO_X GPIOA
// #define TX_GPIO_PIN LL_GPIO_PIN_9 // 跑步机面板
#define TX_GPIO_X GPIOB
#define TX_GPIO_PIN LL_GPIO_PIN_8 // 跑步机面板

#define TX_L() ll_gpio_reset_bits(TX_GPIO_X, TX_GPIO_PIN); // IO_TX=0;
#define TX_H() ll_gpio_set_bits(TX_GPIO_X, TX_GPIO_PIN);   // IO_TX=1;

void simulate_uart_io_init(void);

/*!
 * @brief 	模拟串口1发送一个字节
 * @param
 * @return	none
 * @note	数据低位在前高位在后
 */
void MUSART1_SendData(unsigned char data_value);
/*!
 * @brief 	模拟串口1发送数组
 * @param
 * @return	none
 * @note
 */
void MUSART1_SendStr(unsigned char *data_value, unsigned char data_len);
#endif
